<template>
  <div class="">
    <div class="" v-for="(item) in lists" :key="item.id">
      <!-- 标题 -->
      <div class="item-title border-bottom">
        <span class="item-title-icon"></span>
        {{item.title}}
        
        <!-- 内容显示 -->
      
      </div>
      
      <!-- 递归--删除(原因样式太丑，结构不符合要求) -->
      <!-- <div v-if="item.children" class="item-child">          
        <DetailList :lists="item.children" />
      </div> -->
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailList",
  props: ["lists"],
  data() {
    return {

    }
  },  
  mounted() {
  },
}
</script>

<style scoped>
  .item-title {
    line-height: 40px;
    font-size: 16px;
    padding: 0px 10px;

  }
  .item-child {
    padding: 0px 10px;
  }
  .item-title .item-title-icon {
    position: relative;
    z-index: -1;

    left: 3px;
    top: 3px;
    display: inline-block;
    width: 16px;
    height: 16px;
        
    background: url(http://s.qunarzz.com/piao/image/touch/sight/detail.png) 0 -.45rem no-repeat;
    background-size: 20px, 15px;
    margin-right: 5px;
  } 


  .border-bottom::before {
    content: "";
    border-bottom: 1px solid #ccc;
  }
</style>